home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Documents / OOPClass / Labs / RPNCalculator / RPNCalculator.m < prev    next >
Encoding:
Text File  |  1992-08-11  |  671 b   |  65 lines

  1. /*Objective_C Implementation of the RPNCalculator Class: RPNCalculator.m*/
  2.  
  3. //EXERCISE:  IMPLEMENT EACH OF THE METHODS BELOW
  4.  
  5. #import <stdio.h>
  6. #import "RPNCalculator.h"
  7.  
  8. @implementation RPNCalculator
  9.  
  10. //Initialize a new RPNCalculator instance
  11. -init
  12. {
  13.  
  14. }                                                                       
  15. // Enter a number
  16.  
  17. -(float)enter:(float)number
  18. {
  19.  
  20. }
  21.  
  22. //Add new entry
  23. -(float)add:(float)number
  24. {
  25.  
  26. }
  27.  
  28. //Add two elements
  29. -(float)add
  30. {
  31.  
  32. }
  33.  
  34. //Subtract new entry
  35. -(float)subtract:(float)number
  36. {
  37.  
  38. }
  39.  
  40. //Subtract two elements
  41. -(float)subtract
  42. {
  43.  
  44. }
  45.  
  46. // Print the calculator's stack
  47. -printStack
  48. {
  49.  
  50. }
  51.  
  52. // Empty the calculator's stack
  53. -allClear
  54. {
  55.  
  56. }
  57.  
  58. // Free the calculator and its stack
  59. -free
  60. {
  61.  
  62. }
  63.  
  64. @end
  65.